{% extends "management/base.html" %}
{% block title %}修改密码{% endblock %}

{% block content %}

    <div class="container">
        <div class="row">
            <div class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1">
                {% if state == 'password_error' %}
                    <div class="well">
                        <h2 class="text-danger text-center">密码错误</h2>
                    </div>
                {% elif state == 'repeat_error' %}
                    <div class="well">
                        <h2 class="text-warning text-center">密码重复错误</h2>
                    </div>
                {% elif state == 'empty' %}
                    <div class="well">
                        <h2 class="text-warning text-center">密码不能为空</h2>
                    </div>
                {% elif state == 'success' %}
                    <div class="well">
                        <h2 class="text-success text-center">修改成功</h2>
                    </div>
                {% endif %}
                <form method="POST" role="form" class="form-horizontal">
                    {% csrf_token %}
                    <h1 class="form-signin-heading text-center">修改密码</h1>
                    <div class="form-group">
                        <label for="id_old" class="col-md-3 control-label">原始密码：</label>
                        <div class="col-md-9">
                            <input type="password" class="form-control" required name="old_password" id="id_old">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="id_new" class="col-md-3 control-label">新密码：</label>
                        <div class="col-md-9">
                            <input type="password" class="form-control" required name="new_password" id="id_new">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="id_new_re" class="col-md-3 control-label">重复密码：</label>
                        <div class="col-md-9">
                            <input type="password" class="form-control" required name="repeat_password" id="id_new_re">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-4 col-md-offset-4">
                            <button class="btn btn btn-primary btn-block" type="submit">提交</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

{% endblock %}
